'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx, app } = this;
    // ctx.body = 'hello, egg';
    // const res = await ctx.service.product.index();
    // console.log(res);
    const result = await app.mysql.select('tbl_usr');
    console.log('result: ', result);
    // await ctx.render('index.html', {
    //   res,
    //   list: result,
    // });
    ctx.body = result;
  }
}

module.exports = HomeController;
